﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace VoiceTestPlatform.Infrastrature
{
    public class Log
    {
        static StringBuilder sb;
        static Log()
        {
            sb = new StringBuilder();
        }


        public static void Write(string log)
        {
            sb.AppendLine(DateTime.Now.ToString("yyyyMMdd-HH:mm:ss"));
            sb.AppendLine(log);

        }

        public static void Save()
        {
            //string cd = ParameterManager.RunDir;
            //string sp = Path.Combine(cd, DateTime.Now.ToString("yyyyMMddHHmmss") + "RunLog.log");
            //using (FileStream NewText = File.Create(sp))
            //{
            //    using (StreamWriter fileWriter = new StreamWriter(NewText))
            //    {
            //        fileWriter.Write(sb.ToString());
            //    }
            //}
        }
    }
}
